package com.github.wxiaoqi.security.common.msg;

import java.util.List;

/**
 * <p></p>
 * Created by huangjt on 2018-12-19.
 * company robustel
 */
public class RV {
    /**
     * 返回成功
     * @return
     */
    public static BaseResponse ok( ){
        return new BaseResponse(200, "success",true);
    }

    /**
     * 返回成功
     * @param data
     * @return
     */
    public static BaseResponse ok(Object data){
        return new ObjectRestResponse(data);
    }

    /**
     *
     * @param data
     * @return
     */
    public static BaseResponse page(List data){
        return new PageResultResponse(data);
    }

    /**
     * 返回失败
     * @param code
     * @param msg
     * @return
     */
    public static BaseResponse fail(int code, String msg ){
        return new BaseResponse(code,msg,false);
    }
}
